// 添加cookie
function addCookie(name, value) {
    /*
     * var cookieString = name + "=" + escape(value); // 判断是否设置过期时间 if
     * (expiresDay > 0) { var date = new Date(); date.setTime(date.getTime() +
     * expiresDay * 24 * 3600 * 1000); cookieString = cookieString + ";
     * expires=" + date.toGMTString() + "; path=/sz_insured"; } document.cookie =
     * cookieString;
     */
    localStorage.setItem(name, value);
}

// 获取cookie
function getCookie(name) {
    /*
     * var strCookie = document.cookie; var arrCookie = strCookie.split("; ");
     * for (var i = 0; i < arrCookie.length; i++) { var arr =
     * arrCookie[i].split("="); if (arr[0] == name) return unescape(arr[1]); }
     * return "";
     */
    if (localStorage.getItem(name) == null) {
        return "";
    } else {
        return localStorage.getItem(name);
    }
}

// 删除cookie
function deleteCookie(name) {
    /*
     * var exp = new Date(); exp.setTime(exp.getTime() - 1); document.cookie =
     * name + "=v; expires=" + exp.toGMTString() + "; path=/sz_insured";
     */
    localStorage.removeItem(name);
}